package com.yoda.mall.admin.controller;

import com.yoda.mall.admin.service.CompanyAddressService;
import com.yoda.mall.model.entity.oms.CompanyAddress;
import com.yoda.mall.model.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shawn
 * @date 2022年 12月 18日 21:57
 */
@RestController
@RequestMapping("/companyAddress")
public class CompanyAddressController {

    @Resource
    private CompanyAddressService companyAddressService;

    @GetMapping("/list")
    public R getAllCompanyAddress(){
        List<CompanyAddress> companyAddresses = companyAddressService.getAllCompanyAddress();
        return R.success(companyAddresses);
    }
}
